package cn.com.dcsgo.config;

import cn.com.dcsgo.interceptors.FeignRequestInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

/**
 * Feign配置类，用于注册Feign相关组件
 */
@Configuration
@ConditionalOnClass(WebMvcConfigurationSupport.class)
public class FeignConfig {

    @Bean
    public FeignRequestInterceptor customFeignRequestInterceptor() {
        return new FeignRequestInterceptor();
    }
}